//
//  UIViewController+StoryBoard.m
//  DaibaiService
//
//  Created by Mac-Mini-KingVision on 15/8/27.
//  Copyright (c) 2015年 Mac-Mini-KingVision. All rights reserved.
//

#import "UIViewController+StoryBoard.h"

@implementation UIViewController (StoryBoard)


+(instancetype)loadFromStoryBoard:(NSString *)storyName
{
    UIStoryboard *storyBoard = [UIStoryboard storyboardWithName:storyName bundle:nil];
    if (storyBoard) {
        return [storyBoard instantiateViewControllerWithIdentifier:NSStringFromClass([self class])];
    }
    return nil;
}

+(instancetype)loadFromStoryBoardWithInitialViewController:(NSString *)storyName
{
    UIStoryboard *storyBoard = [UIStoryboard storyboardWithName:storyName bundle:nil];
    if (storyBoard) {
        return [storyBoard instantiateInitialViewController];
    }
    return nil;
}

//+(instancetype)loadFromStoryBoard:(NSString *)storyName identifier:(NSString *)identifier
//{
//    UIStoryboard *storyBoard = [UIStoryboard storyboardWithName:storyName bundle:nil];
//    if (storyBoard) {
//        return [storyBoard instantiateViewControllerWithIdentifier:NSStringFromClass([self class])];
//    }
//    return nil;
//}




@end
